// 200 成功 201业务异常 500系统异常 401 402用户信息失效
type CodeType = number | 200 | 201 | 500 | 401 | 402;
export interface ResponseBodyType<T = any> {
  code: CodeType;
  data: T;
  message: string;
  state: boolean;
  timestamp: number;
  token: string;
}

export interface ResponseBody<T = any> {
  message: string;
  code: number;
  data?: T | T[];
}

/** 统一返回结构体 */

export interface PageResult<T = any> {
  data: T[];
  current?: number;
  pageSize?: number;
  total?: number;
  success: boolean;
}

export interface RequestResult<T = any> {
  data: T;
  success: boolean;
  errorMessage: string;
}
